package com.it.base.arithmetic.tree.entity;

public class Node {
    //编号
    private int key;
    //左节点
    private Node leftNode;
    //右节点
    private Node rightNode;
    //数据域，本节点的的数据
    private Object data;

    /**
     * 打印节点
     */
    public void display(){
        System.out.println(data);
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public Node getLeftNode() {
        return leftNode;
    }

    public void setLeftNode(Node leftNode) {
        this.leftNode = leftNode;
    }

    public Node getRightNode() {
        return rightNode;
    }

    public void setRightNode(Node rightNode) {
        this.rightNode = rightNode;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
